import { createRouter, createWebHistory } from 'vue-router'

const router = new createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/home/index.vue')
    },
    {
      path: '/user',
      name: 'user',
      component: () => import('../views/user/index.vue')
    },
    {
      path: '/:path(.*)',
      component: import('../views/notFound/index.vue')
    }
  ]
})

export default router